<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        /* div:not(.demo) {
            background-color: #f40;
        } */

        div:not([id]) {
            background-color: #09f;
        }


        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        ul {
            width: 300px;
            border: 1px solid;
        }
        li {
            height: 50px;
        }
        li:not(:last-child) {
            border-bottom: 1px solid #999;
        }

    </style>
</head>
<body>
    <div class="demo">1</div>
    <div class="demo">2</div>
    <div class="test">3</div>
    <div>4</div>
    <div id="demo">5</div>

    <ul>
        <li>Lorem.</li>
        <li>Modi.</li>
        <li>Dolores.</li>
        <li>Quis.</li>
        <li>Nesciunt.</li>
        <li>Eveniet.</li>
    </ul>

</body>
</html>